Auto merge of #3092 - jhbabon:fix/dont-panic-on-workspaces, r=alexcrichton
authorbors <bors@rust-lang.org>
Wed, 14 Sep 2016 20:27:39 +0000 (13:27 -0700)
committerGitHub <noreply@github.com>
Wed, 14 Sep 2016 20:27:39 +0000 (13:27 -0700)
commit939922974bc18df2daac055fd1bcb2c2d87d629d
tree8a64163a65f024410dfa3e693fc335dcb6ce936b
parent7f642f583bf71796d3137df19f0316468aba5fc0
parent015e79728c972036e125916cee76e6460da51493
Auto merge of #3092 - jhbabon:fix/dont-panic-on-workspaces, r=alexcrichton

FIX: Don't try to generate Gargo.lock on empty workspaces.

There was a `panic!` when the command `cargo update` was executed in a workspace like this:

    mkdir ws
    cd ws
    echo '[workspace]' > Cargo.toml
    cargo new p1
    cargo new p2
    cargo update

The problem is that cargo tries to generate the `Cargo.lock` file even if there aren't any members on the workspace.

This fix checks the existence of members in the workspace before trying to do anything so at least we report an error instead of throwing a `panic!`.

Issue related https://github.com/rust-lang/cargo/issues/3080